<template>
  <div>
    <div>p1===p2: {{ eq }}</div>
    <div>retP1: {{ retP1 }}</div>
    <div>retP2: {{ retP2 }}</div>
    <div>p3===p4: {{ eq2 }}</div>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
const p1 = Promise.resolve(1)
const p2 = Promise.resolve(p1)
console.log(p1, p2)
const eq = ref(p1 === p2)
const retP1 = ref()
const retP2 = ref()
;(async () => {
  retP1.value = await p1
  retP2.value = await p2
})()
const p3 = Promise.reject()
const p4 = Promise.resolve(p3)
console.log(p3, p4)
const eq2 = ref(p3 === p4)
</script>

<style scoped></style>
